ok.. what's with this 'var' thing in C#?? [closed]
Posted
by KevinDeus
on Stack Overflow
See other posts from Stack Overflow
or by KevinDeus
Published on 2010-04-30T17:08:14Z
Indexed on
2010/04/30
17:17 UTC
Read the original article
Hit count: 206
Possible Duplicate:
Use of var keyword in C#
I have ReSharper, which is a pretty good tool to remind me of some good programming practices..
for example it always recommends that I use the most narrowed convention I can use when passing variables to functions (such as recommending IEnumerable instead of List when I fail to use any of List's specific function.
Awesome.
However, one of its new behaviors (for C# 4.0) is to remind me at every opportunity to use 'var' when declaring variables.
Now I know that there are some valid uses of 'var', but do I really want to use it all the time?
I'm sure that ReSharper has a reason for this, but I can't figure it out.. for me it makes the code less readable..
© Stack Overflow or respective owner